package com.jbit.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jbit.pojo.Employee;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jbit.pojo.common.RespBean;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lirenzhi
 * @since 2021-06-24
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * 分页显示获取员工
     * @param page
     * @param employee
     * @param beginDateScope
     */
    IPage<Employee> getEmployeeByPage(Page<Employee> page, @Param("employee") Employee employee, @Param("beginDateScope") LocalDate[] beginDateScope);

    /**
     * 查询员工  不传参数，查所有
     * @param id
     * @return
     */
    List<Employee> getEmployee(Integer id);

    /**
     * 获取所有员工工资账套
     * @param page
     * @return
     */
    IPage<Employee> getEmployeeWithSalary(Page<Employee> page);

    /**
     * 批量导出
     * @param ids
     * @return
     */
    List<Employee> getEmployeeBatch(@Param("ids") Integer[] ids);
}
